﻿using System;
using System.Net;

namespace Terraria.Net
{
	// Token: 0x02000153 RID: 339
	public class TcpAddress : RemoteAddress
	{
		// Token: 0x06000E9C RID: 3740 RVA: 0x0000E07C File Offset: 0x0000C27C
		public TcpAddress(IPAddress address, int port)
		{
			this.Type = AddressType.Tcp;
			this.Address = address;
			this.Port = port;
		}

		// Token: 0x06000E9D RID: 3741 RVA: 0x0000E099 File Offset: 0x0000C299
		public override string GetIdentifier()
		{
			return this.Address.ToString();
		}

		// Token: 0x06000E9E RID: 3742 RVA: 0x0000E0A6 File Offset: 0x0000C2A6
		public override bool IsLocalHost()
		{
			return this.Address.Equals(IPAddress.Loopback);
		}

		// Token: 0x06000E9F RID: 3743 RVA: 0x0000E0B8 File Offset: 0x0000C2B8
		public override string ToString()
		{
			return new IPEndPoint(this.Address, this.Port).ToString();
		}

		// Token: 0x06000EA0 RID: 3744 RVA: 0x0000E053 File Offset: 0x0000C253
		public override string GetFriendlyName()
		{
			return this.ToString();
		}

		// Token: 0x04001254 RID: 4692
		public IPAddress Address;

		// Token: 0x04001255 RID: 4693
		public int Port;
	}
}
